
<meta charset="utf-8" />	
<form class="form-horizontal" role="form"  onsubmit="return submitForm(this);"
 action="" >
<input type="hidden" id="custHeadPic" name="custHeadPic"/>
<input type="hidden" id="idCardFront" name="idCardFront"/>
<input type="hidden" id="idCardBack" name="idCardBack"/>
<input type="hidden" id="bankCardFrond" name="bankCardFrond"/>
 <br/>
 	<div class="form-group col-xs-6">
			<label class="col-sm-3 control-label no-padding-right">
				银行卡号： </label>
			<div class="col-sm-8">
				<span class="">
					<input type="text" id="cardNo" name="cardNo" 
						class="col-xs-10 col-sm-7" readonly="readonly" />
				</span>
			</div>
	</div>
 	<div class="form-group col-xs-6">
			<label class="col-sm-3 control-label no-padding-right">
				商户编号： </label>
			<div class="col-sm-8">
				<span class="">
					<input type="text" id="custId" name="custId"
						class="col-xs-10 col-sm-7" readonly="readonly" />
				</span>
			</div>
	</div>
	<div class="form-group col-xs-6">
			<label class="col-sm-3 control-label no-padding-right">
				商品订单号： </label>
			<div class="col-sm-8">
				<span class="">
					<input type="text" id="prdOrdNo" name="prdOrdNo"
						class="col-xs-10 col-sm-7" readonly="readonly" />
				</span>
			</div>
	</div>
	<div style="width: 100%;float: left;"></div>
	
<!-- 	<div class="form-group"> -->
<!-- 		<label class="col-sm-2 control-label no-padding-right" -->
<!-- 			for="form-field-1"> 银行卡号 ： </label> -->
<!-- 		<div class="col-sm-4"> -->
<!-- 			<input type="text" id="cardNo" name="cardNo"  -->
<!-- 				class="col-xs-10 col-sm-7" readonly="readonly" /> -->
<!-- 		</div> -->
		
<!-- 		<label class="col-sm-2 control-label no-padding-right" -->
<!-- 			for="form-field-1"> 商户编号 ： </label> -->
<!-- 		<div class="col-sm-4"> -->
<!-- 			<input type="text" id="custId" name="custId" -->
<!-- 				class="col-xs-10 col-sm-7" readonly="readonly" /> -->
<!-- 		</div> -->
		
<!-- 	</div>  -->
	<div class="form-group col-xs-6">
			<label class="col-sm-3 control-label no-padding-right">
				头像照片： </label>
			<div class="col-sm-5">
				<span class="">
					<img id="head" alt="" src="" width="200%" >
				</span>
			</div>
	</div>
	<div class="form-group  col-xs-6">
		<label class="col-sm-3 control-label no-padding-right">
			身份证正面照片： </label>
		<div class="col-sm-5">
			<span class="">
				<img id="front" alt="" src="" width="200%" >
			</span>
		</div>
	</div>
	<div class="form-group  col-xs-6">
		<label class="col-sm-3 control-label no-padding-right">
			身份证背面照片： </label>
		<div class="col-sm-5">
			<span class="">
				<img id="back" alt="" src="" width="200%" >
			</span>
		</div>
	</div>
	<div class="form-group  col-xs-6">
		<label class="col-sm-3 control-label no-padding-right">
			银行卡正面照片： </label>
		<div class="col-sm-5">
			<span class="">
				<img id="cardFront" alt="" src="" width="200%" >
			</span>
		</div>
	</div>
	
	<div class="form-actions align-right  form-button-box" style="margin-top: 10px">
			<button class="btn" type="button" onclick="throughExamine();">
				 审核通过
			</button>
			<button class="btn" type="button" onclick="refuseExamine();">
				 审核不通过
			</button>
			<button class="btn" type="button" onclick="javascript:dialog.close(this);">
				 关闭
			</button>
	</div>
</form>
<script type="text/javascript">
<!--

//-->

$(document).ready(function() {
	setTimeout(setPic, 600);
});

function setPic(){
		document.getElementById("head").src ="mpbase/pic/view2.do?picid="+$("#custHeadPic").val();
		document.getElementById("front").src ="mpbase/pic/view2.do?picid="+$("#idCardFront").val();
		document.getElementById("back").src ="mpbase/pic/view2.do?picid="+$("#idCardBack").val();
		document.getElementById("cardFront").src ="mpbase/pic/view2.do?picid="+$("#bankCardFrond").val();
}

function submitForm(obj){
	
	//自定义匿名回调函数。 系统默认回调函数：dialogAjaxDone
	return validateCallback(obj,function(result){
		if(result.rspcod== 200){
			msg.alert("提示", result.rspmsg, 'correct');
			$("#grid-table").trigger("reloadGrid");
			dialog.close(obj);
		}else{
			msg.alert("错误", result.rspmsg + " 错误代码："
					+ result.rspcod, 'error');
		}
	});
}

function throughExamine(){
	var custId = $("#custId",$("#dlg-examine")).val();
	var prdOrdNo = $("#prdOrdNo",$("#dlg-examine")).val();
	$.ajax({
		type : "post",
		url : "mpomng/prdInf/throughExamine.do",
		data:{"custId":custId,"prdOrdNo":prdOrdNo},
		dataType : 'json',
		success : function(result) {
			if(result.rspcod== 200){
				msg.alert("提示",result.rspmsg,'correct');
				dialog.closeById('dlg-examine');
			}else{
				msg.alert("错误",result.rspmsg,'error');
			}
		},
		error : function(XMLHttpRequest, textStatus) {
			msg.alert("错误", "错误代码：" + XMLHttpRequest.status + ",错误描述："+ textStatus, 'error');
		}
	});
}

function refuseExamine(){
	$.ajax({
		type : "post",
		url : "mpomng/prdInf/refuseExamine.do",
		data:{"custId":"123123"},
		dataType : 'json',
		success : function(result) {
			if(result.rspcod== 200){
				msg.alert("提示",result.rspmsg,'correct');
				dialog.closeById('dlg-examine');
			}else{
				msg.alert("错误",result.rspmsg,'error');
			}
		},
		error : function(XMLHttpRequest, textStatus) {
			msg.alert("错误", "错误代码：" + XMLHttpRequest.status + ",错误描述："+ textStatus, 'error');
		}
	});
}

</script>
